﻿using Mysoft.Common.Attributes.AutoMapping;
using Mysoft.Dto.Basic;
using Mysoft.Entity;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Mysoft.Dto
{
    [CreateMapper(SourceType = new[] { typeof(Sys_Dictionary) })]
    public class DictionaryDto:DtoBase
    {
        /// <summary>
        /// 键
        /// </summary>
        [Required(ErrorMessage = "键不能为空")]
        public virtual string? Key { get; set; }

        /// <summary>
        /// 键 中文
        /// </summary>
        public virtual string? Name { get; set; }

        /// <summary>
        /// 值
        /// </summary>
        public virtual string? Value { get; set; }

        /// <summary>
        /// 上级ID
        /// </summary>
        [Required(ErrorMessage = "上级ID不能为空")]
        public virtual Guid? PID { get; set; }
    }
}
